/*
package com.aaa.come.service.impl;

import com.aaa.come.entity.Outorder;
import com.aaa.come.mapper.OutorderMapper;
import com.aaa.come.service.OutorderService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.*;

*/
/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author aaa
 * @since 2020-11-24
 *//*

@Service
public class OutorderServiceImpl extends ServiceImpl<OutorderMapper, Outorder> implements OutorderService {

    @Autowired
    private OutorderMapper outorderMapper;


    */
/**
    * @Description: 根据条件分页查询 //描述
    * @Param: [page（页数）, size（一页几条数据）, outorder（查询条件封装类）]//参数
    * @return: com.baomidou.mybatisplus.extension.plugins.pagination.Page<com.aaa.come.entity.Outorder>
    * @Author: 岚氓//作者
    * @Date: 2020/11/27  10:12
    *//*

    @Override
    public Page<Outorder> findPageOutioder(Integer page, Integer size,Outorder outorder) {
        Page<Outorder> pageinfo=new Page<>(page,size);
        QueryWrapper<Outorder> queryWrapper=new QueryWrapper<>();
        String outorderno=outorder.getOutorderno();//出库单号
        String state=outorder.getState();//订单状态
        String receiver=outorder.getReceiver();//收件人
        Date begin=outorder.getBeginTime();//查询出库开始时间
        Date end=outorder.getEndTime();//查询出库截至时间
        String province=outorder.getProvince();//省
        String city=outorder.getCity();//市
        String county=outorder.getCounty();//县
        if (StringUtils.isNotEmpty(outorderno)){
            queryWrapper.like("outorderno",outorderno);
        }
        if (StringUtils.isNotEmpty(state)){
            queryWrapper.like("state",state);
        }
        if (StringUtils.isNotEmpty(receiver)){
            queryWrapper.like("receiver",receiver);
        }
        if (StringUtils.isNotEmpty(province)){
            queryWrapper.like("province",province);
            if (StringUtils.isNotEmpty(city)){
                queryWrapper.like("city",city);
                if (StringUtils.isNotEmpty(county)){
                    queryWrapper.like("county",county);
                }
            }
        }
        if (begin!=null&&end==null){
            queryWrapper.gt("depottime",begin);
        }else if(begin==null&&end!=null){
            queryWrapper.lt("depottime",end);
        }else if (begin!=null&&end!=null){
            queryWrapper.between("depottime",begin,end);
        }
        Page<Outorder> outorderPage = outorderMapper.selectPage(pageinfo,queryWrapper);
        return outorderPage;
    }

    */
/**
    * @Description: 状态查询 //描述
    * @Param: []//参数
    * @return: java.util.List<java.util.Map>
    * @Author: 岚氓//作者
    * @Date: 2020/11/27  10:13
    *//*

    @Override
    public List<Map> findState() {
        return outorderMapper.findState();
    }

    */
/**
    * @Description: 省市级联查 //描述
    * @Param: []//参数
    * @return: java.util.List<java.util.Map>
    * @Author: 岚氓//作者
    * @Date: 2020/11/27  10:13
    *//*

    @Override
    public List<Map> findCity() {
        List<Map> city = outorderMapper.findCity();
        List<Map> parent=new ArrayList<>();
        for (Map map : city) {
            if (map.get("type").equals(1)){
                parent.add(map);
            }
        }
        for (Map map : parent) {
            sonCreate(map,city);
        }
        return parent;
    }


    */
/**
    * @Description: 省市级联省下面的 //描述
    * @Param: [parent（省）, city（所有城市）]//参数
    * @return: java.lang.String
    * @Author: 岚氓//作者
    * @Date: 2020/11/27  10:14
    *//*

    public String sonCreate(Map parent,List<Map> city){
        List<Map> list=new ArrayList<>();
        for (Map map : city) {
            if (parent.get("id").equals(map.get("pid"))){
                list.add(map);
            }
        }
        for (Map map : list) {
            sonCreate(map,city);
        }
        parent.put("son",list);
        return "结束";
    }
}
*/
